package org.vectrics.recruiter.struts.tag;

import org.apache.log4j.Logger;
import org.vectrics.SystemException;
import org.vectrics.user.PersonSearchCriteria;

/**
 * @author mmoore
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public class UserSearchResultsTag extends RecruitUserManagerTag {
	
	private static final long serialVersionUID = -7270509762044441485L;

	private transient static Logger log = Logger.getLogger(UserSearchResultsTag.class);
	
	/**
	 * 
	 */
	public UserSearchResultsTag() {
		super();
		super.setWidth("837px");
	}

	protected PersonSearchCriteria getUserCriteria() {
		log.debug("getCriteria() called");
		if (this.getRequest() == null)
			throw new SystemException("Http request not assigned to this instance");
		
		PersonSearchCriteria criteria = null;
		
		criteria = (PersonSearchCriteria)this.getRequest().getSessionAttribute("userSelectCriteria");
		if (criteria == null) {
			criteria = super.getUserCriteria();
		}
		return(criteria);
	}
	

	protected String getPageListLink() {
		String link = null;
		link = getContextPath() + "/admin/user/nameSearchResults.do";
		return(link);
	}
	
}
